.class Lcom/example/m6shop/PhoneImgActivity$3;
.super Ljava/lang/Thread;
.source "PhoneImgActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/example/m6shop/PhoneImgActivity;->uploadFile2Svr2()Z
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/example/m6shop/PhoneImgActivity;


# direct methods
.method constructor <init>(Lcom/example/m6shop/PhoneImgActivity;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lcom/example/m6shop/PhoneImgActivity$3;->this$0:Lcom/example/m6shop/PhoneImgActivity;

    .line 207
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 10

    .prologue
    .line 209
    invoke-super {p0}, Ljava/lang/Thread;->run()V

    .line 213
    new-instance v2, Ljava/io/File;

    iget-object v7, p0, Lcom/example/m6shop/PhoneImgActivity$3;->this$0:Lcom/example/m6shop/PhoneImgActivity;

    iget-object v7, v7, Lcom/example/m6shop/PhoneImgActivity;->picPath:Ljava/lang/String;

    invoke-direct {v2, v7}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 215
    .local v2, "file":Ljava/io/File;
    sget-object v7, Ljava/lang/System;->out:Ljava/io/PrintStream;

    new-instance v8, Ljava/lang/StringBuilder;

    const-string v9, "\u56fe\u7247\u5730\u5740-"

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v9, p0, Lcom/example/m6shop/PhoneImgActivity$3;->this$0:Lcom/example/m6shop/PhoneImgActivity;

    iget-object v9, v9, Lcom/example/m6shop/PhoneImgActivity;->picPath:Ljava/lang/String;

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 217
    new-instance v7, Ljava/lang/StringBuilder;

    iget-object v8, p0, Lcom/example/m6shop/PhoneImgActivity$3;->this$0:Lcom/example/m6shop/PhoneImgActivity;

    iget-object v8, v8, Lcom/example/m6shop/PhoneImgActivity;->m:Lmyapp/MyApp;

    invoke-virtual {v8}, Lmyapp/MyApp;->getWebConfig()Ljava/lang/String;

    move-result-object v8

    invoke-static {v8}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v8

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v8, "/index.php?ctrl=app&action=updateimg&datatype=json"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 218
    .local v4, "httpUrl":Ljava/lang/String;
    sget-object v7, Ljava/lang/System;->out:Ljava/io/PrintStream;

    new-instance v8, Ljava/lang/StringBuilder;

    const-string v9, "\u7406\u89e3-"

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v8, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 219
    sget-object v7, Ljava/lang/System;->out:Ljava/io/PrintStream;

    const-string v8, "---------------"

    invoke-virtual {v7, v8}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 220
    new-instance v5, Lorg/apache/http/client/methods/HttpPost;

    invoke-direct {v5, v4}, Lorg/apache/http/client/methods/HttpPost;-><init>(Ljava/lang/String;)V

    .line 221
    .local v5, "request":Lorg/apache/http/client/methods/HttpPost;
    new-instance v3, Lorg/apache/http/impl/client/DefaultHttpClient;

    invoke-direct {v3}, Lorg/apache/http/impl/client/DefaultHttpClient;-><init>()V

    .line 222
    .local v3, "httpClient":Lorg/apache/http/client/HttpClient;
    new-instance v1, Lorg/apache/http/entity/FileEntity;

    const-string v7, "binary/octet-stream"

    invoke-direct {v1, v2, v7}, Lorg/apache/http/entity/FileEntity;-><init>(Ljava/io/File;Ljava/lang/String;)V

    .line 224
    .local v1, "entity":Lorg/apache/http/entity/FileEntity;
    invoke-virtual {v5, v1}, Lorg/apache/http/client/methods/HttpPost;->setEntity(Lorg/apache/http/HttpEntity;)V

    .line 225
    const-string v7, "binary/octet-stream"

    invoke-virtual {v1, v7}, Lorg/apache/http/entity/FileEntity;->setContentEncoding(Ljava/lang/String;)V

    .line 227
    :try_start_0
    invoke-interface {v3, v5}, Lorg/apache/http/client/HttpClient;->execute(Lorg/apache/http/client/methods/HttpUriRequest;)Lorg/apache/http/HttpResponse;

    move-result-object v6

    .line 228
    .local v6, "response":Lorg/apache/http/HttpResponse;
    sget-object v7, Ljava/lang/System;->out:Ljava/io/PrintStream;

    invoke-virtual {v6}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
    :try_end_0
    .catch Lorg/apache/http/client/ClientProtocolException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1

    .line 239
    .end local v6    # "response":Lorg/apache/http/HttpResponse;
    :goto_0
    return-void

    .line 230
    :catch_0
    move-exception v0

    .line 233
    .local v0, "e":Lorg/apache/http/client/ClientProtocolException;
    invoke-virtual {v0}, Lorg/apache/http/client/ClientProtocolException;->printStackTrace()V

    goto :goto_0

    .line 235
    .end local v0    # "e":Lorg/apache/http/client/ClientProtocolException;
    :catch_1
    move-exception v0

    .line 238
    .local v0, "e":Ljava/io/IOException;
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_0
.end method

.method public declared-synchronized start()V
    .locals 1

    .prologue
    .line 245
    monitor-enter p0

    :try_start_0
    invoke-super {p0}, Ljava/lang/Thread;->start()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 246
    monitor-exit p0

    return-void

    .line 245
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method
